x86emul: avoid undefined behavior when dealing with 10-byte FPU operands
authorJan Beulich <jbeulich@suse.com>
Fri, 9 Dec 2016 11:04:23 +0000 (12:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 9 Dec 2016 11:04:23 +0000 (12:04 +0100)
commitd445f0cc38412ce55959b3da68b9fb481b6d9d45
treed79fb8f8c74b3514a55114f1958910ae4748787a
parent50e793214f1021589942f8744a60eed72af91a68
x86emul: avoid undefined behavior when dealing with 10-byte FPU operands

Accessing an 8-byte (or perhaps just 4-byte in the test harness when
built as 32-bit app) field to read/write 10 bytes (leveraging the
successive field) is a latent bug, as the compiler could copy things
around. Use the 32 bytes large SSE/AVX slot instead.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c